using System;
using System.Data;
using System.Collections.Generic;
using Soccer.Core;
using Soccer.Utility;

namespace Soccer.Business
{
    [TableAttribute("LineupDetails")]
	[Serializable]
    public class LineupDetail : DBO<LineupDetail>
    {
		#region Fields
		
		private int? _IdLineupDetail;
		private int? _IdLineup;
		private int? _IdPlayer;
		private string _Position;
		private int? _NumberClothe;
		
		#endregion
		
		#region Constructors
		/// <summary>
		/// Default constructor
		/// </summary>
		public LineupDetail()
		{
			
		}
		
		/// <summary>
		/// Constructor with IdLineupDetail 
		/// </summary>
		/// <param name="IdLineupDetail">The IdLineupDetail</param>
		public LineupDetail(int? IdLineupDetail )
		{
			this.IdLineupDetail = IdLineupDetail;
		}
		
		/// <summary>
		/// Constructor with all parameters
		/// </summary>
		/// <param name="IdLineupDetail">Sets int? value for IdLineupDetail</param>
		/// <param name="IdLineup">Sets int? value for IdLineup</param>
		/// <param name="IdPlayer">Sets int? value for IdPlayer</param>
		/// <param name="Position">Sets string value for Position</param>
		/// <param name="NumberClothe">Sets int? value for NumberClothe</param>
		public LineupDetail(int? idLineupDetail, int? idLineup, int? idPlayer, string position, int? numberClothe)
		{
			this.IdLineupDetail = idLineupDetail;
			this.IdLineup = idLineup;
			this.IdPlayer = idPlayer;
			this.Position = position;
			this.NumberClothe = numberClothe;
		}
		
		#endregion
		
		#region Properties
		
		/// <summary>
		/// Gets or sets int? value for IdLineupDetail
		/// </summary>
		[ColumnAttribute("IdLineupDetail", SqlDbType.Int , 4 , true, true, false)]
		public int? IdLineupDetail
		{
			set
			{
				this._IdLineupDetail = value;
			}
			get
			{
				return this._IdLineupDetail;
			}
		}
		
		/// <summary>
		/// Gets or sets int? value for IdLineup
		/// </summary>
		[ColumnAttribute("IdLineup", SqlDbType.Int , 4 , false, false, true)]
		public int? IdLineup
		{
			set
			{
				this._IdLineup = value;
			}
			get
			{
				return this._IdLineup;
			}
		}
		
		/// <summary>
		/// Gets or sets int? value for IdPlayer
		/// </summary>
		[ColumnAttribute("IdPlayer", SqlDbType.Int , 4 , false, false, true)]
		public int? IdPlayer
		{
			set
			{
				this._IdPlayer = value;
			}
			get
			{
				return this._IdPlayer;
			}
		}
		
		/// <summary>
		/// Gets or sets string value for Position
		/// </summary>
		[ColumnAttribute("Position", SqlDbType.NVarChar , 50 , false, false, true)]
		public string Position
		{
			set
			{
				this._Position = value;
			}
			get
			{
				return this._Position;
			}
		}
		
		/// <summary>
		/// Gets or sets int? value for NumberClothe
		/// </summary>
		[ColumnAttribute("NumberClothe", SqlDbType.Int , 4 , false, false, true)]
		public int? NumberClothe
		{
			set
			{
				this._NumberClothe = value;
			}
			get
			{
				return this._NumberClothe;
			}
		}
		
		
		/// <summary>
		/// Get a Lineup of current LineupDetail object base on IdLineup
		/// </summary>
		public Lineup Lineup
		{
			get
			{
				if (this.IdLineup == null)
					return null;
	
				Lineup condition = new Lineup(this.IdLineup);
				return LineupController.FindItem(condition);
			}
		}
		
		/// <summary>
		/// Get a Player of current LineupDetail object base on IdPlayer
		/// </summary>
		public Player Player
		{
			get
			{
				if (this.IdPlayer == null)
					return null;
	
				Player condition = new Player(this.IdPlayer);
				return PlayerController.FindItem(condition);
			}
		}
		
		#endregion
        
        #region Other Properties
        private static ColumnNameStruct? _ColumnName;
        public static ColumnNameStruct ColumnName
        {
            get
            {
                if (!_ColumnName.HasValue)
                    _ColumnName = new ColumnNameStruct();
                return _ColumnName.Value;
            }
        }
        #endregion

        #region NestedType
        public  struct ColumnNameStruct
        {
            /// <summary>
            /// Get the name of column [IdLineupDetail]
            /// </summary>
            public string IdLineupDetail
            {
                get
                {
                    return "IdLineupDetail";
                }
            }
            /// <summary>
            /// Get the name of column [IdLineup]
            /// </summary>
            public string IdLineup
            {
                get
                {
                    return "IdLineup";
                }
            }
            /// <summary>
            /// Get the name of column [IdPlayer]
            /// </summary>
            public string IdPlayer
            {
                get
                {
                    return "IdPlayer";
                }
            }
            /// <summary>
            /// Get the name of column [Position]
            /// </summary>
            public string Position
            {
                get
                {
                    return "Position";
                }
            }
            /// <summary>
            /// Get the name of column [NumberClothe]
            /// </summary>
            public string NumberClothe
            {
                get
                {
                    return "NumberClothe";
                }
            }
        }
        #endregion
    }
}
